package com.orhon.smartcampus.modules.systemctl.mm;

import com.orhon.smartcampus.modules.base.mm.LangMapper;
import com.orhon.smartcampus.modules.systemctl.entity.OrgDuties;
import com.orhon.smartcampus.modules.systemctl.entity.Schoolsettings;
import com.orhon.smartcampus.modules.systemctl.gqlModel.GQLDuty;
import com.orhon.smartcampus.modules.systemctl.gqlModel.GQLSchoolSettingss;
import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(
        uses = {
                LangMapper.class
        }
)
public interface DutyMapper {

    DutyMapper MAPPER = Mappers.getMapper(DutyMapper.class);

    @Mapping(source ="id" , target = "id")
    @Mapping(source ="dutiesName" , target = "duties_name")//lang
    @Mapping(source ="dutiesOrder" , target = "duties_order")
    GQLDuty toDuties(OrgDuties moduleentity);

    @InheritConfiguration(name = "toSchoolsettings")
    List<GQLSchoolSettingss> toSchoolsettingsList(List<Schoolsettings> entities);


}
